home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
misc
/
emu
/
BBcpuclk1_0.lha
/
BBcpuclk1.0
/
BBcpuclk.doc
< prev
next >
Wrap
Text File
|
1995-05-19
|
7KB
|
214 lines
BBcpuclk Rev 1.0
(C) Copyright 1995 Remi Lenoir
BBcpuclk is FREEWARE
What is BBcpuclk ?
------------------
BBcpuclk is a program that allows some CPU upgrades for 386SX machines to
work properly with a Commodore A2386SX BridgeBoard. It has been tested with
the Evergreen RevTo486 (386SX3+) upgrade and a TI486SXLC2-50 chip.
The problem
-----------
The Evergreen SLC3 upgrades uses an enhanced version of the 386SX developed
by IBM. This enhanced version uses, among other things, a clock tripled core
to improve performance. The problem is when used in a 2386 Bridgeboard
the CPU hangs when the clock tripler circuit is started. In other words, you
can use the CPU at 16, 20 or 25Mhz (depending on which BridgeBoard you have)
and take advantage of its internal 16KB cache but you can not take advantage
of the clock tripler. Considering the price of the toy, it's pretty annoying.
The reason
----------
I was not able to determine the exact reason of the failure except that the
IBM486SLC3 "doesn't like" the clock it receives from the BridgeBoard.
The solution
------------
What guided me to the solution is that the clock tripler operates properly when
the BridgeBoard BIOS is configured with SYSTEM SPEED = LOW.
The solution consists of giving a "better" clock to the CPU. How is this done ?
This is done by modifying the configuration of the PC chipset used on the
BridgeBoard. One of the chips (VL82C311) contains a unit that generates the CPU
clock and the BUS clock. This unit is quite flexible and looks like this:
TURBO ON/OFF
|
|
|
\|/
|-----|
|---------------------| |
| | | \
| |-----------| | MUX |----- CLK2
| \| | \| | /
TCLK2 ----|---| NON-TURBO |-----| |
/| DIVIDER | /|------
| |
|-----------|
/|\
|
|
|
DIVIDE RATIO
(1, 2, 3, 4)
Notes:
- TCLK2 is the output of the oscillator from which the CPU clock is derived.
- CLK2 is the CPU clock. In a standard 386SX it is divided by two before
going to the core giving an operating frequency half of CLK2.
(32Mhz for a 16Mhz system, 40Mhz for a 20Mhz one and 50Mhz for a 25Mhz one).
As you can see, you have two ways of giving the CLK2 clock to the CPU. By going
direct (TURBO option) or by going through the divider and choose a ratio of 1.
When the BridgeBoard is configured as SYSTEM SPEED = HIGH (in BIOS SETUP), the
unit is configured in TURBO mode, when SYSTEM SPEED = LOW, the unit is
configured in NON TURBO with a divide ratio of 2 (half speed).
The solution is to provide CLK2 by going through the divider with a ratio
of 1 rather than using the TURBO mode. In theory it should be equivalent but
the Evergreen upgrade does not operate reliably with the TURBO mode whereas it
does with NON TURBO. I think the clock generated with the NON TURBO mode has
faster rise time/fall time and/or less skew or something like this that keeps
the clock tripler circuit happy.
The program
-----------
You have to execute the BBcpuclk program before you start the clock tripler.
The clock tripler is started when the CPU is configured and this is done by
the Evergreen configuration program launched in the CONFIG.SYS file. The problem
is that I am anything but a PC specialist and I don't know how to write a .SYS
program. Fortunately there is a utility called WRAPPER.SYS that will launch a
.COM or .EXE program from the CONFIG.SYS file. Just insert the following line
in the first line of your CONFIG.SYS file:
DEVICE = WRAPPER.SYS BBcpuclk.com
Then you can insert the call to the Evergreen configuration program.
Notes:
------
I wrote this program because I upgraded my BridgeBoard by changing the CPU: I
removed the original 386SX and replaced it with a TI486SXLC2-50. Then, I
ran into the problem that it would hang when I would start the clock doubler.
So this clock doubler/clock tripler problem also affects the TI chip. Strangely
enough, it doesn't seem to affect the Cyrix SRX2-50 upgrades.
(I will later release an AmigaGuide file giving more information on how to
upgrade a BridgeBoard).
When I finally got my system to work (thanks to Brian for providing me with the
VL82C311 data sheet) I remembered reading posts about the Evergreen upgrade
not working well and thought that people with an Evergreen might have the same
problem. That's around the time that I met Peter on c.s.a.emulations and provided
him with the program. He did BETA testing and later got in touch with Gary who
found the WRAPPER program putting an end to the config.sys problem.
I still don't know the exact reason why the CPU hangs when its clock does not
go through the divider. I might take a closer look at that later but as
everything is working...
Although this program is working for me and at least two other persons, I can
not guarantee that it will work for others, neither I can guarantee that the
information given in this file is valid or accurate. You use this program and
this information at your own risk.
BBcpuclk source code:
---------------------
;
; BBcpuclk.asm
;
; (C) Copyright 1995 Remi Lenoir
;
cseg segment
assume cs:cseg,ds:cseg
org 100h
start: mov al,7
out 0ech,al
in al,0edh ;read CLKTCL register
and al,9fh ;set NON TURBO divider ratio to 1
out 0edh,al ;write CLKCTL register
mov al,0
out 0f4h,al ;switch to NON TURBO mode
exit: mov al,0
mov ah,04ch
int 21h
db 'BBcpuclk (C) Copyright 1995 Remi Lenoir'
cseg ends
end start
This program was assembled using a public domain 80x86 assembler called A86.
A86 can be found on a SIMTEL archive (/msdos/asmutil/a86v372.zip).
If you know how to write a .SYS version of BBcpuclk, I would like to here
from you.
WRAPPER.SYS:
-----------
This program can be found on a SIMTEL archive (/msdos/bootutil/wrapsy10.zip)
or from compuserve.
WRAPPER.SYS is Copyright (1992) by Philip B. Gardner.
Distribution:
-------------
BBcpuclk is FREEWARE. It is not public domain. The author gives permission for
BBcpuclk to be freely distributed provided that copying charges remain in the
same range as Fred Fish and that no modification is made to the original
distribution.
If you want to include BBcpuclk in a commercial product, please contact me.
My current email address is dvs@netcom.com. As I share this mailbox with other
persons, I would rather prefer you post questions in the c.s.a.emulations
newsgroup that I regularly check.
Credits:
--------
I would like to thank the following persons:
- Brian J. Heyboer for providing me with the VL82C311 data-sheet.
- Peter Ouzts for BETA testing the program on the Evergreen upgrade.
- Gary S. Cooper for BETA testing the program and pointing out the
WRAPPER.SYS program.
and all other persons who have shared information on the BridgeBoard.
Remi.